package com.depth.viewer.container.definition
{
	import com.depth.viewer.loader.LoadUrlSystem;
	import com.depth.viewer.widget.definition.BaseWidgetDefinition;
	import com.depth.viewer.widget.definition.IBaseWidgetDefinition;
	import com.depth.viewer.widget.definition.IWidgetDefinition;
	
	import mx.collections.ArrayCollection;
	
	import org.springextensions.actionscript.context.support.XMLApplicationContext;
	import org.springextensions.actionscript.puremvc.patterns.facade.IocFacade;

	public class WidgetContainerDefinition  implements IWidgetContainerDefinition
	{
		
		private var _id:String;
		private var _url:String;
		private var _parentContainer:String;
		private var _widgetDefs:ArrayCollection;
		private var _context:XMLApplicationContext;
		private var _facade:IocFacade;
		public function WidgetContainerDefinition()
		{
		}
		
		public function get id():String
		{
			return this._id;
		}
		
		public function set id(value:String):void
		{
			this._id = value;
		}
		
		public function get url():String
		{
			return LoadUrlSystem.instance.getURL(this._url);
		}
		
		public function set url(value:String):void
		{
			this._url = value;
		}
		
		public function get facade():IocFacade{
			return this._facade;
		}
		public function set facade(value:IocFacade):void{
			this._facade = value;
		}
		
		public function get context():XMLApplicationContext{
			return this._context;
		}
		public function set context(value:XMLApplicationContext):void{
			this._context = value;
		}
		public function set widgetDefinitions(value:ArrayCollection):void
		{
			for each(var widgetDef:IBaseWidgetDefinition in value){
				widgetDef.container = this;
			}
			this._widgetDefs = value;
		}
		
		public function get widgetDefinitions():ArrayCollection
		{
			return this._widgetDefs;
		}
		
		public function set widgetLayout(value:Object):void
		{
		}
		
		public function get widgetLayout():Object
		{
			return null;
		}
		
		public function set configParams(value:Object):void
		{
		}
		
		public function get configParams():Object
		{
			return null;
		}
		
		public function getWidget(id:String):IWidgetDefinition
		{
			return null;
		}
		
		public function containWidget(widget:IWidgetDefinition):Boolean
		{
			return false;
		}
		
		
		
		
		public function set parentContainer(value:String):void{
			this._parentContainer = value;
		}
		public function get parentContainer():String{
			return this._parentContainer;
		}
	}
}